Lmendoa/pd 6016 - #2903
Merged
Merged
Conversation
The stored oauthRedirectUrl has one writer, AuthorizeGuard, and it only runs when an unauthenticated visitor hits /oauth/authorize. The first successful sign in reads that URL and clears it, so by the time the authorization screen renders the key is already gone. Signing out from that screen hard navigates to /signin with the OAuth query params intact, which never crosses AuthorizeGuard and so never stores the URL again. SignInGuard does not store it either. A following institutional sign in therefore returns to third-party-signin-completed with nothing to redirect to, and the guard falls through to my-orcid instead of the authorization screen. Store the current authorize URL before logging out, using window.location.href so the value matches what AuthorizeGuard writes and get() strips show_login and prompt exactly as it does on the first pass. It runs before noRedirectLogout so the URL survives a failed logout.
src/test.ts was configured as the karma main but contained only the zone.js import and initTestEnvironment, without the require.context that pulls in spec files. With a main set, the builder loads only that entry, so ng test ran 1 test while 334 spec files sat unexecuted. The suite has effectively been a no-op, which is how a regression can land in a file that ships with tests. Declare zone.js/testing alongside the existing polyfills and drop main, which lets the builder discover specs from tsconfig.spec.json. Delete test.ts, now unreachable, and drop it from the spec tsconfig files list.
Turning spec discovery back on surfaced six component specs that had never run. They fail identically on 20.1.6, so none of this is fallout from the upgrade; they simply rotted unobserved. Most were missing TestBed imports for what their templates actually use: MatFormField/MatInput for mat-form-field and the errorStateMatcher binding, MatCard/MatCheckbox for the interstitial, ReactiveFormsModule for [formGroup], and CUSTOM_ELEMENTS_SCHEMA where a template renders a sibling app-* component. Real modules rather than NO_ERRORS_SCHEMA, so the specs keep catching template errors. Two specs stubbed FormBuilder with object literals that only looked like form controls. They passed only because ReactiveFormsModule was absent and the bindings were never evaluated; with the directives present they have to be real, so use the actual FormBuilder. ShareEmailsDomains also needed a record carrying emailDomains, since the component builds its form inside a filtered subscription and an empty record left formGroup bound to undefined.
Member
Contributor
🚀 Preview DeploymentYour UI docs preview is ready! Preview URL: https://orcid.github.io/orcid-angular/runway/PD-6016/ This preview will be updated automatically when you push new commits to this PR. Deployed from commit: |
amontenegro
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.